package com.d0304;

public class Shuixianhua {
    public static void main(String[] args){
        System.out.println("以下是所有的水仙花数");
        int number = 100;
        int i, j, k;
        for (int sum; number<1000; number++){
            i=number/100;  j=(number-i*100)/10;  k=number-i*100-j*10;
            sum=i*i*i+j*j*j+k*k*k;
            if (sum==number) System.out.println(number+" is a dafodil number! ");
        }
    }
}
